//
//  NSString+LCExtension.h
//  LCPackage
//
//  Created by 马军凯 on 2021/6/22.
//  Copyright © 2021 龙采科技集团. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (LCExtension)
@property (nonatomic) BOOL CrazyValidatePhoneNum; //手机验证
@property (nonatomic) BOOL CrazyValidateIdentityCard; //身份证号

// textField的placeHolder
+ (NSAttributedString *)textFieldPlaceHolderStringWithText:(NSString *)text font:(UIFont *)font color:(UIColor *)color;

// 给label划中线
+ (NSMutableAttributedString *)stringMidLine:(NSString *)string;

//修改某一段的字体和颜色
+ (NSMutableAttributedString *)changeSectionFontAndColorWithString:(NSString *)text font:(UIFont *)font color:(UIColor *)color from:(NSInteger)from lenth:(NSInteger)lenth;
//改变某一段的字体大小
+ (NSMutableAttributedString *)changeSectionFontWithString:(NSString *)text font:(UIFont *)font from:(NSInteger)from lenth:(NSInteger)lenth;
//修改某一段的字体颜色
+ (NSMutableAttributedString *)changeSectionColorWithString:(NSString *)text color:(UIColor *)color from:(NSInteger)from lenth:(NSInteger)lenth;
//修改
+ (NSMutableAttributedString *)changeSectionFontAndColorWithString:(NSString *)text font:(UIFont *)font color:(UIColor *)color fontFrom:(NSInteger)fontFrom fontLenth:(NSInteger)fontLenth colorFrom:(NSInteger)colorFrom colorLenth:(NSInteger)colorLenth;
//把手机号中间四位变成****
+ (NSString *)crazyReplaceStar:(NSString *)str;
//去除空格
+ (NSString *)deleteSpaceWith:(NSString *)str;

//时间转换成时间戳   2018-09-26 -> 1537949271
+ (NSString *)timeChangeTimeString:(NSString *)time;
//详细时间转换成时间戳   2018-09-26 16:07:51 -> 1537949271
+ (NSString *)detailTimeChangeTimeString:(NSString *)time;
//时间戳转换成时间  1537949271 -> 2018-09-26
+ (NSString *)timeStringChangeTime:(NSString *)timeString;
//时间戳转换成详细时间  1537949271 -> 2018-09-26 16:07:51
+ (NSString *)timeStringChangeDetailTime:(NSString *)timeString;
//当前时间转换成时间戳
+ (NSString *)currentTimeChangeTimeString;

//视频第一帧
- (NSString *)videoFirstFrame;

@end

NS_ASSUME_NONNULL_END
